import request from '@/utils/request'

export function getAgentsList(params) {
  return request({
    url: '/agents',
    params
  })
}

export function addAgents(data) {
  return request({
    url: '/agents',
    method: 'POST',
    data
  })
}

export function getAgentsDetail(id) {
  return request({
    url: '/agents/' + id
  })
}
export function getAgentsCount(params) {
  return request({
    url: '/agents/count',
    method: 'GET',
    params
  })
}
export function delAgents(id) {
  return request({
    url: '/agents/' + id,
    method: 'DELETE'
  })
}
export function editAgents(data) {
  return request({
    url: '/agents/' + data.id,
    method: 'PUT',
    data
  })
}
